package com.codecrane.core.util;

/**
 * 物流状态
 */
public enum PhysicalStatusEnum {
    未处理(1, "创建计划"),
    已分配(2,"分配计划"),
    取消分配(21,"取消分配"),
    待分配(22,"自动分配计划"),
    取消预分配(23,"取消自动分配计划"),
    已发运(3,"发运计划"),
    已开船(4,"开船计划"),
    已清关(5,"清关计划"),
    已送货(6,"送货计划"),
    已入库(7,"入库计划");

    private int code;
    private String msg;

    PhysicalStatusEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }



    public static String getStatusName(int code) {
        for (PhysicalStatusEnum statusEnum : PhysicalStatusEnum.values()) {
            if (code == statusEnum.getCode()) {
                return statusEnum.getMsg();
            }
        }
        return "";
    }
}
